package com.poetry.model;

import java.io.Serializable;
import java.util.Objects;

public class LikeId implements Serializable {
    private Long user;
    private Long poem;

    public LikeId() {
    }

    public LikeId(Long user, Long poem) {
        this.user = user;
        this.poem = poem;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LikeId likeId = (LikeId) o;
        return Objects.equals(user, likeId.user) &&
               Objects.equals(poem, likeId.poem);
    }

    @Override
    public int hashCode() {
        return Objects.hash(user, poem);
    }
} 